﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Skugo.Shared
{
    /// <summary>
    /// In the 'Trees' message, we need to be able to communicate each node
    /// in the tree; this enumeration represents whether those nodes have a name or not.
    /// </summary>
    [Flags]
    public enum NodeOptions : byte
    {
        /// <summary>
        /// No flags are set.
        /// </summary>
        None = 0,

        /// <summary>
        /// The node type is named, which means we need to read a string for its name.
        /// </summary>
        Name = 1,

        /// <summary>
        /// The node has a description.
        /// </summary>
        Description = 2,

        /// <summary>
        /// The node has a category.
        /// </summary>
        Category = 4,

        /// <summary>
        /// The node is expanded by default (only valid for expandable nodes).
        /// </summary>
        DefaultExpanded = 8,
    }

    /// <summary>
    /// In the 'Trees' message, we need to be able to communicate each node
    /// in the tree; this enumeration represents those types in the tree.
    /// </summary>
    public enum NodeKind : byte
    {
        /// <summary>
        /// The node represents an expandable object. Expandable objects do not thier own value, however
        /// they do contain children, and can support the ability to add or remove children.
        /// </summary>
        Expandable,

        /// <summary>
        /// An enumerable node means that its possible options can be enumerated. This works well for
        /// any data set (such as an enum, or a list of resoureces enumerable by name).
        /// </summary>
        Enumerable,

        /// <summary>
        /// A primitive is a value type that can be edited specially on the property grid.
        /// </summary>
        Primitive,

        /// <summary>
        /// The node represents a bound method, which is callable if all parameters are primitive.
        /// </summary>
        Method,
    }
}
